package main

// fastCGI 服务端 因此要配合nginx使用

import (
	"net"
	"net/http"
	"net/http/fcgi"
)

type FastCGI struct {}
func (s *FastCGI) ServeHTTP(resp http.ResponseWriter, req *http.Request){
	resp.Write([]byte("Hello FastCGI"))
}

func main() {
	listener, _ := net.Listen("tcp", "127.0.0.1:8989")
	srv := new(FastCGI)
	fcgi.Serve(listener, srv)
	select {}
}
